package com.tl.architecture.base.activity

import androidx.lifecycle.ViewModelProvider
import androidx.viewbinding.ViewBinding
import com.tl.architecture.base.viewmodel.BaseViewModel
import java.lang.reflect.ParameterizedType

abstract class BaseVBVMActivity<VB : ViewBinding, VM : BaseViewModel> : BaseVBActivity<VB>() {
     val viewModel:VM by lazy {
         val type =
             (javaClass.genericSuperclass as ParameterizedType).actualTypeArguments[1] as Class<VM>
         ViewModelProvider(this)[type]
     }
}